#ifndef CMP_H
#define CMP_H 

#include <sc.h>

#define _4V80 0x15
#define _4V36 0x22
#define _4V27 0x00
#define _4V11 0x16
#define _4V00 0x23
#define _3V84 0x01
#define _3V69 0x24
#define _3V60 0x17
#define _3V49 0x02
#define _3V43 0x25
#define _3V20 0x03
#define _2V95 0x04
#define _2V88 0x19
#define _2V82 0x28
#define _2V74 0x05
#define _2V67 0x29
#define _2V62 0x1A
#define _2V56 0x06
#define _2V53 0x2A
#define _2V40 0x07
#define _2V29 0x2C
#define _2V26 0x08
#define _2V18 0x2D
#define _2V13 0x09
#define _2V09 0x2E
#define _2V06 0x1D
#define _2V02 0x0A
#define _2V00 0x2F

#define SET_CMP_Vol(Vol) do{\
                            CMPCON1 &=~ 0x3F;\
                            CMPCON1 |= Vol;\
                            } while (0);
							
void CMP_VDD_LOW();
void CMP_VDD_LOW_OFF();
void CMP_VDD_Full();
#endif 